package com.cq.teacher.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cq.teacher.mapper.TeacherDisciplineMapper;
import com.cq.teacher.domain.TeacherDiscipline;
import com.cq.teacher.service.ITeacherDisciplineService;

/**
 * 学科Service业务层处理
 * 
 * @author cq
 * @date 2024-01-06
 */
@Service
public class TeacherDisciplineServiceImpl implements ITeacherDisciplineService 
{
    @Autowired
    private TeacherDisciplineMapper teacherDisciplineMapper;

    /**
     * 查询学科
     * 
     * @param id 学科主键
     * @return 学科
     */
    @Override
    public TeacherDiscipline selectTeacherDisciplineById(Long id)
    {
        return teacherDisciplineMapper.selectTeacherDisciplineById(id);
    }

    /**
     * 查询学科列表
     * 
     * @param teacherDiscipline 学科
     * @return 学科
     */
    @Override
    public List<TeacherDiscipline> selectTeacherDisciplineList(TeacherDiscipline teacherDiscipline)
    {
        return teacherDisciplineMapper.selectTeacherDisciplineList(teacherDiscipline);
    }

    /**
     * 新增学科
     * 
     * @param teacherDiscipline 学科
     * @return 结果
     */
    @Override
    public int insertTeacherDiscipline(TeacherDiscipline teacherDiscipline)
    {
        return teacherDisciplineMapper.insertTeacherDiscipline(teacherDiscipline);
    }

    /**
     * 修改学科
     * 
     * @param teacherDiscipline 学科
     * @return 结果
     */
    @Override
    public int updateTeacherDiscipline(TeacherDiscipline teacherDiscipline)
    {
        return teacherDisciplineMapper.updateTeacherDiscipline(teacherDiscipline);
    }

    /**
     * 批量删除学科
     * 
     * @param ids 需要删除的学科主键
     * @return 结果
     */
    @Override
    public int deleteTeacherDisciplineByIds(Long[] ids)
    {
        return teacherDisciplineMapper.deleteTeacherDisciplineByIds(ids);
    }

    /**
     * 删除学科信息
     * 
     * @param id 学科主键
     * @return 结果
     */
    @Override
    public int deleteTeacherDisciplineById(Long id)
    {
        return teacherDisciplineMapper.deleteTeacherDisciplineById(id);
    }
}
